package com.bookmanager.www.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bookmanager.www.entity.FlBook;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDateTime;

/**
 * <p>
 * 图书表 服务类
 * </p>
 *
 * @author 风离
 * @since 2021-09-17
 */
public interface FlBookService extends IService<FlBook> {

    /**
     * 根据ISBN插入图书信息
     * @param bookId
     * @param bookUpId
     * @param status
     * @param title
     * @param authorIntro
     * @param img
     * @param isbn
     * @param author
     * @param price
     * @param pages
     * @param doubanScore
     * @param douban
     * @param published
     * @param categoriesId
     * @param inventory
     * @param description
     * @param publishing
     * @param createdTimestamp
     * @param updatedTimestamp
     * @return
     */
    int insertBookByISBN(String bookId, String bookUpId, int status, String title,
                         String authorIntro, String img, String isbn, String author,
                         String price, String pages, String doubanScore, String douban, String published, int categoriesId, int inventory, String description,
                         String publishing, LocalDateTime createdTimestamp, LocalDateTime updatedTimestamp);

    /**
     * 分类分页
     * @param flBook
     * @param page
     * @param pageSize
     * @param cid
     * @return
     */
    IPage<FlBook> selectPageExt(FlBook flBook, Integer page, Integer pageSize,Integer cid);

    /**
     * 零元购分页
     * @param flBook
     * @param page
     * @param pageSize
     * @return
     */
    IPage<FlBook> selectPageExtZeroBuyBook(FlBook flBook, Integer page, Integer pageSize);
}
